<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page import="org.jeecgframework.web.util.StaticValue" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@include file="/context/mytags.jsp" %>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
<link rel="stylesheet" href="plug-in/uploadify/css/uploadify.css" type="text/css"/>
<script type="text/javascript" src="plug-in/uploadify/jquery.uploadify-3.1.min.js"></script>
<script type="text/javascript" src="plug-in/jquery/jquerysession.js"></script>
<html>
<head>
    <title>物流签收</title>
</head>
<body>
<div style="margin-bottom:10px;">
    <img style="margin-bottom:-7px" src="../plug-in/login/images/dispatch bill.png">
    <span class="list-title">${cbsDelinerPage.code}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <span style="font-size:13px;">状态：<span class="color-red">${deliverStatus.typename}</span></span>
</div>
<input type="hidden" id="id" value="${cbsDelinerPage.id}"/>
<input type="hidden" id="sessionId" value="${pageContext.session.id}">
<input type="hidden" value="${cbsDelinerPage.status}" id="status"/>
<input type="hidden" value="${cbsDelinerPage.logisticsSendTime}" id="logisticsSendTime"/>
<input type="hidden" value="${slaType}" id="slaType"/>

<div class="subtitle">
    <p>关联信息</p>
    <table class="nobordertable noborder">
        <tbody>
        <tr>
            <td class="al_r" width="20%">
                <label>服务单号CR:</label>
            </td>
            <td width="30%">
                ${cbsDelinerPage.crCode}
            </td>
            <td class="al_r" width="20%">
                <label>备件申请单号:</label>
            </td>
            <td width="30%">
                ${cbsDelinerPage.spaceNumber}
            </td>
        </tr>
        <tr>
            <td class="al_r" width="20%">
                <label>SR:</label>
            </td>
            <td width="30%">
                ${cbsDelinerPage.srCode}
            </td>
            <td class="al_r" width="20%">
                <label>SO:</label>
            </td>
            <td width="30%">
                ${cbsDelinerPage.soCode}
            </td>
        </tr>
                <tr>
			 <td class="al_r" width="20%">
				 <label>发货单类型:</label>
			 </td>
			 <td width="30%">
				 <c:forEach items="${deliverTypeList}" var="tsType">
					 <c:if test="${tsType.typecode==cbsDelinerPage.deliverType}">
						 <label>${tsType.typename}</label>
					 </c:if>
				 </c:forEach>
			 </td>
			 <td class="al_r" width="20%">

			 </td>
			 <td width="30%">

			 </td>
		 </tr>
        </tbody>
    </table>
</div>
<div class="subtitle">
    <p>发货申请</p>
    <table class="ftable">
        <tbody>
        <tr>
            <th>备件类型</th>
            <th>备件号</th>
            <th>数量</th>
            <th>是否返件</th>
            <th>序列号</th>
            <th>二维码</th>
            <th>仓库</th>
            <th>库位</th>
            <th>物流单号</th>
            <th>计费重量(KG)</th>
        </tr>
        <c:forEach items="${deliverEquipmentList}" var="deliverEquipment" varStatus="index">
            <tr>
                <td>${deliverEquipment.typeDes}</td>
                <td>${deliverEquipment.item}</td>
                <td>${deliverEquipment.total}</td>
                <td><c:if test="${deliverEquipment.isReturn==2}">是</c:if>
                    <c:if test="${deliverEquipment.isReturn==1}">否</c:if>
                </td>
                <td>${deliverEquipment.deliverSn}</td>
                <td>${deliverEquipment.deliverErcode}</td>
                <td><span id="signCity${index.index}">${deliverEquipment.deliverId.deliverWarehouseId.name}</span>&nbsp;
                </td>
                <td>
                    <c:forEach items="${types}" var="type">
                        <c:if test="${deliverStatus.typename!='物流待发货'}">
                                <c:if test="${deliverEquipment.wLocaltion == type.typecode}">${type.typename}</c:if>
                        </c:if>
                        <c:if test="${deliverStatus.typename=='物流待发货'}">
                                <c:if test="${type.typecode == cbsDelinerPage.wLocaltion}">${type.typename}</c:if>
                        </c:if>
                    </c:forEach>
                </td>
                <td>${deliverEquipment.logisticsNumber}</td>
                <td>${deliverEquipment.weight}</td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
    <div style="margin-top:20px; width: 98%; margin: 10px auto;"><span style="font-weight: bold;">说明</span></div>
    <div class="line"></div>
    <table class="nobordertable noborder" style="border: none;">
        <tbody>
        <tr>
            <td class="al_r" width="20%">
                <label>发货说明:</label>
            </td>
            <td width="30%">
                ${cbsDelinerPage.deliverDes}
            </td>

        </tr>
        <tr>
            <td class="al_r" width="20%">
                <label>备件申请人:</label>
            </td>
            <td width="30%">
                <c:if test="${Hb == '1'}">
                    <c:choose>
                        <c:when test="${list!= null}">
                            <c:forEach items="${list}" var="mymap" varStatus="index">
                                ${mymap.shortname}&nbsp;&nbsp; ${mymap.name}&nbsp;&nbsp; ${mymap.phone}<br>
                            </c:forEach>
                        </c:when>
                        <c:otherwise>
                            ${shortname}&nbsp;&nbsp;${cbsEquipmentApplyEntity.createName}&nbsp;&nbsp;${mobilePhone}
                        </c:otherwise>
                    </c:choose>
                </c:if>
                <c:if test="${Hb == '2'}">
                    ${shortname}&nbsp;&nbsp;${cbsEquipmentApplyEntity.createName}&nbsp;&nbsp;${mobilePhone}
                </c:if>
            </td>
            <td class="al_r" width="20%">
                <label>服务工程师:</label>
            </td>
            <td width="30%">
                ${engineer.belongOrg.departname}&nbsp;&nbsp; ${engineer.name}&nbsp;&nbsp;${engineer.cellphone}
            </td>
        </tr>
        </tbody>
    </table>
</div>
<div class="subtitle">
    <p>收货人信息</p>
    <table class="nobordertable noborder" style="border: none;">
        <tbody>
        <tr>
            <td class="al_r" width="20%">
                <label>是否自提:</label>
            </td>
            <td colspan="3">
                <c:if test="${cbsDelinerPage.zt==1}">是</c:if>
                <c:if test="${cbsDelinerPage.zt==2}">否</c:if>
            </td>
        </tr>
        <tr>
            <td class="al_r" width="20%">
                <label>姓名:</label>
            </td>
            <td width="30%">
                ${cbsDelinerPage.userName}
            </td>
            <td class="al_r" width="20%">
                <label>电话:</label>
            </td>
            <td width="30%">
                ${cbsDelinerPage.phone}
            </td>
        </tr>
        <tr>
            <td class="al_r" width="20%">
                <label>收货地址:</label>
            </td>
            <td width="30%">
                ${cbsDelinerPage.sheng.territoryName} ${cbsDelinerPage.shi.territoryName} ${cbsDelinerPage.address}
            </td>
            <td class="al_r" width="20%">
                <label>影院名称:</label>
            </td>
            <td width="30%">
                ${cbsDelinerPage.cinemaName}
            </td>
        </tr>
        <tr>
            <td class="al_r"><label>自提仓库:</label></td>
            <td colspan="3">
                ${cbsDelinerPage.warehouseId.shi.territoryName}
                &nbsp;&nbsp;
                <%--<span>北京市顺义区李桥镇XXX</span>--%>
            </td>
        </tr>
        </tbody>
    </table>
</div>
<div class="subtitle">
    <p>物流</p>
    <table class="nobordertable noborder" style="border: none;">
        <tbody>
        <tr>
            <td class="al_r" width="20%">
                <label>发货SLA:</label>
            </td>
            <td width="30%">
                ${fhSLA.typename}
            </td>
            <td class="al_r" width="20%">
                <label>提货地址:</label>
            </td>
            <td width="30%">
                <c:if test="${cbsDelinerPage.thSheng!=null}">
                    ${cbsDelinerPage.thSheng.territoryName}&emsp;
                </c:if>
                <c:if test="${cbsDelinerPage.thCity!=null}">
                    ${cbsDelinerPage.thCity.territoryName}&emsp;
                </c:if>
                <c:choose>
                    <c:when test="${cbsDelinerPage.thAddress!= null && cbsDelinerPage.thAddress!=''}">
                        ${cbsDelinerPage.thAddress}
                    </c:when>

                    <c:otherwise>
                        无
                    </c:otherwise>
                </c:choose>
            </td>
        </tr>
        <tr>
            <td class="al_r" width="20%">
                <label>预计到货时间:</label>
            </td>
            <td width="30%">
                <input class="Wdate"
                       value="<fmt:formatDate value="${cbsDelinerPage.expectTime}" pattern="yyyy-MM-dd HH:mm:00"/> "
                       readonly="readonly"/>
            </td>
            <td class="al_r" width="20%">

            </td>
            <td width="30%">

            </td>
        </tr>
        <tr>
            <td class="al_r" valign="top"><label>物流发货备注:</label></td>
            <td colspan="3">
                <textarea style="width:100%; height: 60px;"
                          readonly="readonly">${cbsDelinerPage.logisticsMemo}</textarea>
            </td>
        </tr>
        </tbody>
    </table>
    <%--<div style="text-align: center; margin: 10px auto;">--%>
    <%--<a href="#" class="easyui-linkbutton l-btn">发货</a>--%>
    <%--</div>--%>
</div>
<div class="subtitle">
    <p>签收</p>
    <table class="nobordertable noborder" style="border: none;">
        <tbody>
        <tr>
            <td class="al_r" width="20%">
                <label>签收方式:</label>
            </td>
            <td width="30%">
                <font color="red">*</font> <select id="singMenthod" style="width: auto" disabled="disabled">
                <option value="0">--请选择--</option>
                <c:forEach items="${signTypeList}" var="signType">
                    <option value="${signType.typename}"
                            <c:if test="${cbsDelinerPage.signMethod== signType.typename}">selected="selected"</c:if>>${signType.typename}</option>
                </c:forEach>

                <%--<option <c:if test="${cbsDelinerPage.signMethod=='站点签收'}">selected="selected"</c:if>>站点签收</option>--%>
            </select>
            </td>
            <td class="al_r" width="20%">
                <label>签收时间:</label>
            </td>
            <td width="30%">
                <font color="red">*</font><input class="Wdate" readonly="readonly" id="signTime"
                                                 value="<fmt:formatDate value="${cbsDelinerPage.getTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
            </td>
        </tr>
        <tr>
            <td class="al_r" width="20%">
                <label>物流签收照片:</label>
            </td>
            <td width="30%">
                <c:if test="${cbsDelinerPage.status ne '7'}">
                    <input type="file" id="uploadFile"/><font style="color: red">请上传签收单照片、引擎签收单照片</font>
                </c:if>
                <input type="hidden" id="fileName"/>
                <input type="hidden" id="yqfx" value="${yqfx}"/>
                <span id="file"></span>
                <c:forEach items="${zyFileLogEntityList}" var="zyFileLogEntityList">
                    <span onclick="addOneTab('预览','cbsServiceController.do?openViewFile&fileid=${zyFileLogEntityList.id}')"
                          style="color: blue">${zyFileLogEntityList.oldFileName}</span>
                    <span class="color-blue"><a
                            href="fileUploadController.do?downLoadFile&fileLogId=${zyFileLogEntityList.id}">[下载]</a></span>
                </c:forEach>

            </td>
            <td class="al_r" width="20%">

            </td>
            <td width="30%">

            </td>
        </tr>
        <tr>
            <td class="al_r" width="20%">
                <label>物流发货照片:</label>
            </td>
            <td width="30%">
                <c:if test="${cbsDelinerPage.status ne 7 }"><font style="color: red">请上传外包装照片、返件标签照片</font>
                    <input type="file" id="uploadFile1"/>
                </c:if>

                <input type="hidden" id="fileName1"/>
                <span id="file1"></span>
                <c:if test="${zyFileLogEntityListSend!=null}">
                <c:forEach items="${zyFileLogEntityListSend}" var="zyFileLogEntityList">
                <span id="li_file_${zyFileLogEntityList.id}"><span
                        class="color-blue">${zyFileLogEntityList.oldFileName}</span>&nbsp;&nbsp;
                    <span class="color-blue"><a
                            href="fileUploadController.do?downLoadFile&fileLogId=${zyFileLogEntityList.id}">[下载]</a></span>
                    </c:forEach>
                </c:if>

            </td>

        </tr>
        <tr>
            <td class="al_r" valign="top"><label>签收备注:</label></td>
            <td colspan="3">
                <textarea style="width: 100%; height: 60px;" id="signMemo"
                          readonly="readonly">${cbsDelinerPage.signMemo}</textarea>
            </td>
        </tr>
        <tr id="Unqualified">
            <td colspan="4">
                <c:if test="${cbsDelinerPage.status ne '7'}">
                    <div style="text-align: center; margin: 10px auto;">
                        <a onclick="NodaBiao()" id="btn" class="easyui-linkbutton l-btn">签收</a>
                        <a onclick="Wlsign2()" id="btn2" class="easyui-linkbutton l-btn">签收</a>
                    </div>
                </c:if>
            </td>
        </tr>

        <tr id="performance">
            <td class="al_r" width="20%">
                <label style="color: red">performance未达标，请选择未达标原因</label>
            </td>
        </tr>

        <tr id="performanceReason">
            <td class="al_r" width="20%">
                <label>延迟原因:</label>
            </td>
            <td width="30%">
                <select id="not_qualified" style="width: auto" disabled="disabled">
                    <option value="0">--请选择--</option>
                    <c:forEach items="${sendReasonList}" var="sendReason">
                        <option value="${sendReason.typename}"
                                <c:if test="${cbsDelinerPage.notQualified == sendReason.typename}">selected="selected"</c:if>>${sendReason.typename}</option>

                    </c:forEach>
                    <%--<option <c:if test="${cbsDelinerPage.notQualified == '站点原因'}">selected="selected"</c:if>>站点原因</option>--%>
                </select>
            </td>
            <td class="al_r" width="20%">

            </td>
            <td width="30%">

            </td>
        </tr>
        <tr id="performanceMemo">
            <td class="al_r" valign="top"><label>延迟备注:</label></td>
            <td colspan="3">
                <textarea style="width: 100%; height: 60px;" id="not_qualified_memo"
                          readonly="readonly">${cbsDelinerPage.notQualifiedMemo}</textarea>
            </td>
        </tr>
        </tbody>
    </table>
</div>
<div class="subtitle">
    <p>日志</p>
    <table class="ftable">
        <tbody>
        <tr>
            <th>操作人</th>
            <th>时间</th>
            <th>描述</th>
        </tr>
        <c:forEach items="${logisticsLogList}" var="log">
            <tr>

                <td>${log.createName}</td>
                <td><fmt:formatDate value="${log.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
                <td>${log.description}</td>

            </tr>
        </c:forEach>
        </tbody>
    </table>
</div>
</body>
<script>
    $("#btn2").hide();
    $("#performance").hide();
    $("#btn").css("pointer-events", "auto");
    $(function () {
        if (${cbsDelinerPage.isStandard == '1'}) {
            // $("#performance").hide();
            $("#performanceReason").hide();
            $("#performanceMemo").hide();
        }
    })

    function chooseWarhouse(index) {
        $.session.set("signCity", index);
        $.dialog({
            content: "url:cbsWarehouseController.do?zyChooseWa2",
            zIndex: 2100,
            title: '选择仓库',
            lock: true,
            width: '300px',
            height: '500px',
            left: '85%',
            top: '65%',
            opacity: 0.4,
            init: function () {
                top.myWindow = window;
            },
            button: [{
                name: '确认',
                callback: function () {
                    if (index == 0) {

                    }
                },
                focus: true
            }, {
                name: '返回',
                callback: function () {
                }
            }]
        });
    }

    function lookImg(obj) {
        addOneTab('预览', 'cbsServiceController.do?openViewFile&fileid=' + obj.id)
    }

    $(function () {
        var cbsDeliverId = $("#id").val();
        $("#uploadFile").uploadify({
            buttonText: '上传文件',
            auto: true,
            progressData: 'speed',
            multi: true,
            height: 20,
            width: 60,
            overrideEvents: ['onDialogClose'],
            queueID: 'instructionfile',
            /*fileTypeDesc : '文件格式:',
            fileTypeExts : '*.*',*/
            fileTypeDesc: '支持格式:*',
            fileTypeExts: '*', //控制可上传文件的扩展名，启用本项时需同时声明fileDesc
            fileSizeLimit: '50MB',
            swf: 'plug-in/uploadify/uploadify.swf',
            uploader: '<%=basePath%>/cbsDelinerController.do?uploadFile&businessType=S&cbsDeliverId=' + cbsDeliverId + '&sessionId=' + $("#sessionId").val() + '',
            onUploadStart: function () {
                lockmask(true, '请稍等,导入中...');
            }, onUploadSuccess: function (file, data) {
                lockmask(false);
                var json = $.parseJSON(data).attributes;
                var fileIds = $("#fileId").val();
                // $("#repairAfterFile").val(json.id);
                var html = '<span id="li_file_' + json.id + '"><span class="color-blue" onclick="lookImg(this)" id="' + json.id + '">' + json.name + '</span>&nbsp;&nbsp; ' +
                    '<span style="cursor: pointer;" onclick=\'delFile("' + json.id + '")\'>[删除]</span></span>'

                $("#file").prepend(html);
                $("#fileName").val(json.id);
                // tip("上传成功！");
            }, onFallback: function () {
                tip("您未安装FLASH控件，无法上传文件！请安装FLASH控件后再试");
            }, onSelectError: function (file, errorCode, errorMsg) {
                switch (errorCode) {
                    case -100:
                        tip("上传的文件数量已经超出系统限制的" + $('#instruction').uploadify('settings', 'queueSizeLimit') + "个文件！");
                        break;
                    case -110:
                        tip("文件 [" + file.name + "] 大小超出系统限制的50MB大小！");
                        break;
                    case -120:
                        tip("文件 [" + file.name + "] 大小异常！");
                        break;
                    case -130:
                        tip("文件 [" + file.name + "] 类型不正确！");
                        break;
                }
                ;
            }
        });
    });

    function delFile(id) {
        var flag = true;
        $.ajax({
            url: "cbsServiceReportController.do?delFile",
            data: {
                "id": id
            },
            cache: false,
            dataType: 'json',
            type: 'POST',
            async: false,
            success: function (data) {
                if (!data.success) {
                    flag = false;
                    tip(data.msg);
                } else {
                    tip(data.msg);
                    //隐藏标签
                    $("#li_file_" + id + "").remove();
                    $("#repairFrontFile").val("");
                }
            }
        });
    }

    function save() {
        var id = $("#id").val();
        var notQualified = $("#not_qualified").val();
        var notQualifiedMemo = $("#not_qualified_memo").val();
        $.ajax({
            type: "post",
            dataType: "json",
            data: {"id": id, "notQualified": notQualified, "notQualifiedMemo": notQualifiedMemo},
            url: "cbsDelinerController.do?save",
            success: function (data) {
                var ob = data.attributes;
                if (ob.sta == 1) {
                    tip("保存成功");
                    setTimeout(" addOneTab(\"发货管理\",'cbsDelinerController.do?cbsDeliner');", 1000);
                } else {
                    tip("保存失败");
                }
            }
        })

    }

    // var slaType = $("#slaType").val();
    // if (slaType!=''){
    //     alert(slaType);
    // }
    function Wlsign2() {
        $("#btn").css("pointer-events", "none");
        var id = $("#id").val();
        var singMenthod = $("#singMenthod").val();
        var signTime = $("#signTime").val();
        var yqfx = $("#yqfx").val();
        var fileName = $("#fileName").val();
        var notQualified = $("#not_qualified").val();
        var notQualifiedMemo = $("#not_qualified_memo").val();
        if (yqfx == 1) {
            if (fileName == "") {
                tip("请上传照片");
                $("#btn").css("pointer-events", "auto");
                return false;
            }

        }
        var signMemo = $("#signMemo").val();

        var logisticsSendTime = $("#logisticsSendTime").val();
        if (logisticsSendTime == "" || logisticsSendTime == null) {
            tip("请先物流发货");
            $("#btn").css("pointer-events", "auto");
            return false;
        }
        var signTime = $("#signTime").val();

        if (signTime == '' || signTime == null) {
            tip("请填写签收时间");
            $("#btn").css("pointer-events", "auto");
            return false;
        }
        var status = $("#status").val();
        if (status == 7) {
            tip("该单已签收");
            $("#btn").css("pointer-events", "auto");
            return false;
        }
        var b = CompareDate(logisticsSendTime, signTime);
        // alert(logisticsSendTime+"---------"+signTime+"----"+b)
        if (b) {
            tip("签收时间不能早于发货时间");
            $("#btn").css("pointer-events", "auto");
            return false;
        }
        $.ajax({
            type: "post",
            dataType: "json",
            data: {
                "id": id, "singMenthod": singMenthod, "signTime": signTime, "fileName": fileName, "signMemo": signMemo,
                "notQualified": notQualified, "notQualifiedMemo": notQualifiedMemo
            },
            url: "cbsDelinerController.do?Sign",
            success: function (data) {
                var ob = data.attributes;
                if (ob.st == 1) {
                    tip("签收成功");
                    setTimeout(" addOneTab(\"发货管理\",'cbsDelinerController.do?cbsDeliner');", 1000);
                    setTimeout("closetab('物流签收')", 1000);
                }
                if (ob.st == 2) {
                    tip("该单已签收");
                    $("#btn").css("pointer-events", "auto");
                    // setTimeout('NodaBiao()',1000); performance
                }
                if (ob.st == 2) {
                    tip("签收失败");
                    $("#btn").css("pointer-events", "auto");
                    // setTimeout('NodaBiao()',1000);
                }
            }
        })
    }

    function Wlsign() {
        //alert(123);
        $("#btn").css("pointer-events", "none");
        var id = $("#id").val();
        var singMenthod = $("#singMenthod").val();
        var signTime = $("#signTime").val();
        var yqfx = $("#yqfx").val();
        var fileName = $("#fileName").val();
        if (yqfx == 1) {
            if (fileName == "") {
                tip("请上传照片");
                $("#btn").css("pointer-events", "auto");
                return false;
            }

        }
        var signMemo = $("#signMemo").val();

        var logisticsSendTime = $("#logisticsSendTime").val();
        if (logisticsSendTime == "" || logisticsSendTime == null) {
            tip("请先物流发货");
            $("#btn").css("pointer-events", "auto");
            return false;
        }
        var signTime = $("#signTime").val();

        if (signTime == '' || signTime == null) {
            tip("请填写签收时间");
            $("#btn").css("pointer-events", "auto");
            return false;
        }
        var status = $("#status").val();
        if (status == 7) {
            tip("该单已签收");
            $("#btn").css("pointer-events", "auto");
            return false;
        }
        var b = CompareDate(logisticsSendTime, signTime);
        // alert(logisticsSendTime+"---------"+signTime+"----"+b)
        if (b) {
            tip("签收时间不能早于发货时间");
            $("#btn").css("pointer-events", "auto");
            return false;
        }

        $.ajax({
            type: "post",
            dataType: "json",
            data: {
                "id": id,
                "singMenthod": singMenthod,
                "signTime": signTime,
                "fileName": fileName,
                "signMemo": signMemo
            },
            url: "cbsDelinerController.do?Sign",
            success: function (data) {
                var ob = data.attributes;
                if (ob.st == 1) {
                    tip("签收成功");
                    setTimeout(" addOneTab(\"发货管理\",'cbsDelinerController.do?cbsDeliner');", 1000);
                    setTimeout("closetab('物流签收')", 1000);
                }
                if (ob.st == 2) {
                    tip("该单已签收");
                    $("#btn").css("pointer-events", "auto");
                    // setTimeout('NodaBiao()',1000); performance
                }
                if (ob.st == 2) {
                    tip("签收失败");
                    $("#btn").css("pointer-events", "auto");
                    // setTimeout('NodaBiao()',1000);
                }
            }
        })
    }

    function sleep(numberMillis) {
        var now = new Date();
        var exitTime = now.getTime() + numberMillis;
        while (true) {
            now = new Date();
            if (now.getTime() > exitTime)
                return;
        }
    }

    function NodaBiao() {
        var signTime = $("#signTime").val();
        var logisticsSendTime = $("#logisticsSendTime").val();
        $.ajax({
            type: "post",
            dataType: "json",
            data: {"logisticsSendTime": logisticsSendTime, "signTime": signTime},
            url: "cbsDelinerController.do?ifQualified",
            success: function (data) {
                var slaType = $("#slaType").val();
                var obj = data.attributes;
                // alert(obj.status+"--------------"+slaType)
                // alert(slaType);
                if (slaType != '') {
                    if (obj.status > slaType) {
                        $("#performance").show();
                        $("#btn2").show();
                        $("#btn").hide();
                    } else {
                        Wlsign();
                    }
                }
            }
        })
    }

    /** 比较两个日期大小**/
    function CompareDate(d1, d2) {
        return ((new Date(d1.replace(/-/g, "\/"))) > (new Date(d2.replace(/-/g, "\/"))));
    }
</script>
</html>
